package com.grape.dp.proxy.simple.dynamicproxy.jdk;

/**
 * 描述:JdkTest
 * @author: myx
 * @date: 2019-07-27
 * Copyright © 2019-grape. All rights reserved.
 */
public class JdkTest {
    public static void main(String[] args) {
        //获取代理的生成的class文件
        System.getProperties().put("sun.misc.ProxyGenerator.saveGeneratedFiles", "true");
        JdkInvocationHandler jdkInvocationHandler = new JdkInvocationHandler(new OrderServiceImpl());
        OrderService proxy = jdkInvocationHandler.getProxy();
        proxy.order();
    }
}
